<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/include/page.jsp"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
	<title>用户登录-用户注册</title>
	<%@ include file="/common/include/title.jsp" %>
	<script src="${rootpath }/common/resource/formvalidator4.1.3/jquery-1.4.4.min.js" type="text/javascript"></script>
	<script src="${rootpath }/common/resource/formvalidator4.1.3/formValidator-4.1.3.js" type="text/javascript" charset="UTF-8"></script>
	<script src="${rootpath }/common/resource/formvalidator4.1.3/formValidatorRegex.js" type="text/javascript" charset="UTF-8"></script>
	<script type="text/javascript">
		$(function(){
			$.formValidator.initConfig
			({
				theme:"126",
				submitOnce:true,
				formID:"form1",
			
				onError:function(msg){alert(msg);},
				submitAfterAjaxPrompt : '有数据正在异步验证，请稍等...'
			});
			
			$("#email").formValidator
			({
				onShowFixText:"6~18个字符，包括字母、数字、下划线，以字母开头，字母或数字结尾",
				onShow:"请输入邮箱",
				onFocus:"邮箱6-100个字符,输入正确了才能离开焦点",
				onCorrect:"恭喜你,你输对了",
				defaultValue:""
			}).inputValidator
			({min:6,max:100,onError:"你输入的邮箱长度非法,请确认"}).regexValidator
			({regExp:"^([\\w-.]+)@(([[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.)|(([\\w-]+.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(]?)$",
				onError:"你输入的邮箱格式不正确"
			});
			
			$("#password").formValidator
			({
				onShowFixText:"6~16个字符，包括字母、数字、特殊符号，区分大小写",
			
				onShow:"请输入密码",
				onFocus:"至少1个长度",
				onCorrect:"密码合法"}).inputValidator
				({
					min:6,
					max:16,
					empty:{leftEmpty:false,rightEmpty:false,emptyError:"密码两边不能有空符号"},
					onError:"密码长度错误,请确认"}).passwordValidator
					({
						compareID:"us"
					});
				
			
			$("#passwordConfirm").formValidator
			({
				onShowFixText:"请再次输入密码",
				onShow:"输再次输入密码",
				onFocus:"至少1个长度",
				onCorrect:"密码一致"}).inputValidator
				({
					min:1,empty:{leftEmpty:false,rightEmpty:false,emptyError:"重复密码两边不能有空符号"},
					onError:"重复密码不能为空,请确认"
				}).compareValidator
				({
					desID:"passwordConfirm",
					operateor:"=",
					onError:"2次密码不一致,请确认"
				});
				
			})
	
	</script>
	</head>

	<body>
		<div id="doc">
			<%@ include file="/common/include/header.jsp" %>
			<div id="s_bdw">
				<div id="s_bd">
	
					<div class="dl_zc">
						<div class="dl_zc_title">
							<h2 class="f_l">用户中心_用户注册</h2>
							<div class="rt_bg f_r"></div>
						</div>
						<div class="dl-con cf" id="entry">
							<form id="form" action="${rootpath }/registerSubmit.htm" method="post">
	
								<div class="form" style="width: 600px;">
									<div class="item">
										<span class="label">邮箱：</span>
										<div class="fl">
											<input type="text" id="email" name="email"
												class="text" tabindex="1" value="${requestScope.email }"/>
											<span id="emailTip"></span>
										</div>
									</div>
									<!--item end-->
									<div class="item">
										<span class="label">密码：</span>
										<div class="fl">
											<input type="password" id="password" name="password"
												class="text" tabindex="2" />
											<span id="passwordTip"></span>
										</div>
									</div>
									<!--item end-->
									<div class="item">
										<span class="label">确认密码：</span>
										<div class="fl">
											<input type="password" id="passwordConfirm" name="passwordConfirm"
												class="text" tabindex="2" />
											<span id="passwordConfirmTip"></span>
										</div>
									</div>
									<!--item end-->
									<div class="item">
										<span class="label">验证码：</span>
										<div class="fl">
											<input type="text" id="rand" name="rand" tabindex="2" class="text"/>
											<img src="${rootpath }/randImg.htm" id="randImg" width="75" height="25" style="cursor: pointer;" 
												onclick="return refreshImg('randImg')"/>
											<div id="randTip"></div>
										</div>
									</div>
									<div class="item">
										<span class="label">&nbsp;</span>
										<span class="error_info">
											${info }
										</span>
									</div>
									<!--item end-->
									<div class="item">
										<span class="label">&nbsp;</span>
										<input type="submit" value="注册" tabindex="8"/>
									</div>
									<!--item end-->
								</div>
								</div>
								<!--form end-->
								<div id="guide">
									<h5>还不是商城用户？</h5>
	
									<div class="content">http://www.baidu.com</div>
									<a href="${rootpath }/register.htm" class="btn-personal">注册新用户</a>
	
								</div>
								<!--guide end-->
								<div class="clear"></div>
							</form>
						</div>
						<!--regist end-->
					</div>
					<!--dl_zc end-->
	
					<script type="text/javascript" src="${rootpath }/js/Validate.js"></script>
					<script type="text/javascript" src="${rootpath }/js/Validate.entry.js"></script>
	
				</div>
				<!--s_bd end-->
			</div>
			<!--s_bdw end-->
	
			<%@ include file="/common/include/footer.jsp" %>
	
		</div>
	</body>
</html>
